// EPropertyDate.h: interface for the EPropertyDate class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_EPROPERTYDATE_H)
#define AFX_EPROPERTYDATE_H

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <memory>
#include "ENumericProperty.h"
class PROPERTY_VIEW_LIB_API EPropertyDate final : public EIconTextButtonProperty
{
public:

    EPropertyDate(IPropertyHost *pHost, const std::wstring &sName, time_t *pProperty, bool bEnabled);
    virtual ~EPropertyDate();

    virtual bool OnCommand(EPropWnd *pParent, WPARAM wParam, LPARAM lParam);
    virtual void OnPropClose();
    virtual bool OnPropApply();		//return true if anything changed

    virtual std::wstring GetTextValue();

protected:
    virtual bool HasButton();
    virtual bool HasEdit();

private:
    void CloseMothCalCtrlWindow();
    time_t GetPropertyValue();
    std::unique_ptr<CMonthCalCtrl> m_pPropertyWindow;
};

#endif // !defined(AFX_EPROPERTYDATE_H)
